package com.meego.common.oembed;

import java.io.InputStream;
import java.io.OutputStream;

public interface OembedParser {
	/**
	 * Unmarshals an OembedResponse from the given inputstream
	 * @param httpResponse
	 * @return
	 * @throws OembedException
	 */
	public OembedResponse unmarshal(final InputStream httpResponse) throws OembedException;
	
	/**
	 * Marhsals the given OembedResponse to a string
	 * @param oembedResponse
	 * @return
	 * @throws OembedException
	 */
	public String marshal(final OembedResponse oembedResponse) throws OembedException;
	
	public void marshal(final OembedResponse oembedResponse, final OutputStream outputStream) throws OembedException;
}